<template>
  <div class="table">
    <el-table :data="tableData" stripe width="100%" height="500px">
      <el-table-column prop="name" label="指标名称"> </el-table-column>
      <el-table-column prop="introduction" label="指标释义"> </el-table-column>
      <el-table-column prop="dimensionName" label="所属维度"> </el-table-column>
      <!-- <el-table-column prop="indicatorSystemName" label="所属指标体系"> </el-table-column> -->
      <el-table-column prop="quotaName" label="所属指标体系"> </el-table-column>
      <el-table-column label="操作" v-if="isRelease === '0' && !isEdit">
        <template slot-scope="scope">
          <el-popconfirm
            title="确定取消关联该指标？"
            @confirm="handleRemove(scope.row, scope.$index)"
          >
            <el-link slot="reference" type="primary" :underline="false"
              >取消关联</el-link
            >
          </el-popconfirm>
        </template>
      </el-table-column>
    </el-table>
    <!-- <div class="footer">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageQuery.pageIndex"
        :page-sizes="[10, 15, 20, 25]"
        :page-size="pageQuery.pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="pageQuery.total"
      >
      </el-pagination>
    </div> -->
  </div>
</template>

<script>
export default {
  props: {
    tableData: {
      required: true,
      type: Array,
      default: () => [],
    },
    isRelease: {
      required: false,
      type: String,
    },
    isEdit: {
      required: false,
      type: Boolean,
    },
  },
  data() {
    return {}
  },
  methods: {
    handleRemove(row, index) {
      this.$emit('handleRemove', { row, index })
    },
  },
}
</script>

<style lang="scss" scoped></style>
